<%@page import="cn.edu.ujn.finallab.dao.Customer"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>入住登记</title>
<link href="<c:url value="/css/adminBackground.css"/>" rel="stylesheet"
	type="text/css" />
<link href="<c:url value="/css/checkIn.css"/>" rel="stylesheet"
	type="text/css" />
<link href="<c:url value="/css/indexOfAdmin.css"/>" rel="stylesheet"
	type="text/css" />
</head>
<body>
<div class="whole">
		<div class="front"></div>
		<div class="footer"></div>
		<div class="title">办&nbsp;理&nbsp;入&nbsp;住&nbsp;登&nbsp;记
		<span class="return" style="font-size: 15px"><a href="/finallab/return" onclick="return confirm('返回主页？')" style="color: red;">返回主页</a></span>
		</div>
		<div class="check">
			<form action="<c:url value="/selectOrderByIdCard"/>" method="post" >
				<input type="text" class="inputIdCard" value="" placeholder="输入顾客的身份证号进行查询" name="idCard">
				<input type="submit" class="button" value="查询">
			</form>
		</div>
		<!-- 查询之后直接在下面显示顾客的订单信息 -->
		<!-- 首先是查询结果为空 -->
		<c:if test="${requestScope.size == 0}">
			<div class="msg" style="color: red; width: 100%; text-align: center; font-size: 16px; margin-left: -90px; margin-top: 10px">		
				未查询到该顾客的订单信息！	
			</div>
		</c:if>
		<!-- 查询到订单 -->
		<c:if test="${requestScope.size >= 1}">
		<div class="orderInfo" style="	height: 400px;width: 80%;font-size: 20px;margin: 0 auto; margin-top: 30px">
			<table class="table table-bordered table-striped"  style="margin: auto; text-align: center;" border="1">
			<thead>
				<tr>
					<th  style="width: 150px">订单号</th>
					<th  style="width: 150px">顾客姓名</th>
					<th  style="width: 200px">顾客身份证号</th>
					<th  style="width: 150px">顾客手机号</th>
					<th  style="width: 180px">预定房间号</th>
					<th  style="width: 200px">预定入住时间</th>
					<th  style="width: 200px">预定退房时间</th>
					<th  style="width: 150px">支付金额</th>				
					<th  style="width: 150px">操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${requestScope.orderList}" var="order">
					<tr style="height: 30px">
						<td>${order.orderNumber}</td>
						<td>${order.customerName}</td>
						<td>${order.customerIdcard}</td>
						<td>${order.customerPhone}</td>
						<td>${order.roomNumber}</td>
						<td>${order.inTime}</td>
						<td>${order.outTime}</td>
						<td>${order.price}</td>
						<td class="modify"><a href="/finallab/toCheckIn?orderNumber=${order.orderNumber}" onclick="return confirm('确定为该用户办理入住？')">办理入住</a></td>
					</tr>
				</c:forEach>
				<hr>
			</tbody>
			</table>
		</div>
		</c:if>			
</div>
</body>
</html>
